package com.xb;

import java.util.concurrent.LinkedBlockingDeque;

/**
 * @program: register-jerry
 * @description: 有界队列---线程安全
 * @author: xu.bin
 * @create: 2020-11-22
 */
public class ConcurrentLinkedBlockQueueDemo {
    public static void main(String[]args) throws InterruptedException {
        LinkedBlockingDeque<String> linkedBlockingDeque=new LinkedBlockingDeque(10);
        linkedBlockingDeque.add("124");
        String name= linkedBlockingDeque.take();
        System.out.println("name:"+name);
    }
}